Skip to content

fix: ensure floating UI has loaded before using its functions#560

Merged
LuLaValva merged 2 commits intomainfrom
floating-ui-loaded
Mar 11, 2026
Merged

fix: ensure floating UI has loaded before using its functions#560
LuLaValva merged 2 commits intomainfrom
floating-ui-loaded

Conversation

@LuLaValva
Copy link
Member

Ensure floating UI has loaded before we try to use its functions. This was causing issues with some JSDom tests

Copilot AI review requested due to automatic review settings March 11, 2026 17:36
@changeset-bot
Copy link

changeset-bot bot commented Mar 11, 2026

🦋 Changeset detected

Latest commit: c93cf2a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@ebay/ebayui-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prevents calls into Floating UI APIs before the library has finished loading, avoiding runtime errors (notably in JSDom environments) when tooltip/dropdown positioning updates run too early.

Changes:

  • Guard TooltipBase.updateTip() so it no-ops until Floating UI has loaded.
  • Guard DropdownUtil.update() so it no-ops until Floating UI has loaded.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/ebayui-core/src/components/components/ebay-tooltip-base/component-browser.ts Adds a loaded-state guard before calling computePosition in tooltip positioning updates.
packages/ebayui-core/src/common/dropdown/index.ts Adds a loaded-state guard before building middleware and calling computePosition in dropdown positioning updates.

You can also share your feedback on Copilot code review. Take the survey.

@LuLaValva LuLaValva merged commit 04b3b12 into main Mar 11, 2026
3 checks passed
@LuLaValva LuLaValva deleted the floating-ui-loaded branch March 11, 2026 17:43
@github-actions github-actions bot mentioned this pull request Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants